﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Eniux.Web.Framework.core;
using Microsoft.Expression.Interactivity.Layout;

namespace EniuxTest_SL
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
          
            
            GeneralTransform generalTransform1 = myStackPanel.TransformToVisual(null);

            // Retrieve the point value relative to the child.
            Point currentPoint = generalTransform1.Transform(new Point(0, 0));
            MatrixTransform mx = myTextBlock.RenderTransform as MatrixTransform; ;
            MatrixTransform mar = this.myStackPanel.RenderTransform as MatrixTransform;
            MessageBox.Show(currentPoint.ToString()+";;;"+"\r\n"+
                mar.Matrix.OffsetX.ToString()+";"+mar.Matrix.OffsetY.ToString()
                +"\r\n"+myStackPanel.DragBehavior.X+";"+myStackPanel.DragBehavior.Y);
        }
    }
}
